<template>
  
  <div class="kg-head-he"></div>
<header class="kg-head reg-top">
	<div class="dqxz" @click="back"><i class="micon">&#xe61e;</i></div>
	<div class="search_box show-cansu">
		我的考级
	</div>
</header>
<!---->
<div class="kg-center">
		<!---->
		<div class="xy-ksbox mb25" v-for="(item,i) in list" :key="i"  >
			<div v-if="item.type.val==10">
				<div class="tg-pf" v-if="item.review_status.val==20 && item.cert" ><span>{{item.review}}</span></div>
				<div class="title">
				<div class="title_a">{{item.sign_time}}</div>
				<div class="title-c" v-if="item.file_id==0 && item.review_status.val==10" >请上传考级作品</div>
				<div class="title-c orange" v-if="item.file_id > 0 && item.review_status.val==10" >请等待评级结果</div>
				</div>
			</div>
			<div v-if="item.type.val==20">
				<div class="title">
				<div class="title_a">{{item.sign_time}}</div>
				<div class="title-c">线下</div>
				</div>
			</div>
			
			<div class="kg-ksxqbox">
				<div class="kg-ksxq-list">
					<div class="kg-ksxq-lista">考生姓名</div>
					<div class="kg-ksxq-listb">{{item.nick_name}}</div>
				</div>
				<div class="kg-ksxq-list">
					<div class="kg-ksxq-lista">考点信息</div>
					<div class="kg-ksxq-listb">{{item.addr_title}} / {{item.type.text}}</div>
				</div>
				<div class="kg-ksxq-list kg-ksli-heat">
					<div class="kg-ksxq-lista">考级内容</div>
					<div class="kg-ksxq-listb">{{item.major_first}} / {{item.major_second}} / {{item.grade}} / {{item.sign_item}}</div>
				</div>
			</div>
			<div class="xy-ksbox-bot" >
				<router-link :to="`/upload?sign_id=${item.sign_id}`" v-if="item.review_status.val==10 && item.type.val==10">{{item.file_id==0?'上传作品':'修改作品'}}</router-link>
				<router-link :to="`/detail?sign_id=${item.sign_id}`">查看详情</router-link>
				<a :href="item.cert.cert_url" :download="item.cert.cert_url" v-if="item.review_status.val==20 && item.cert">下载证书</a>
			</div>
		</div>
		
	<!---->
	
	<!---->

	<a-empty :description="null" v-if="!list.length">暂无数据</a-empty>
<!---->   	
</div>
</template>

<script>
import { reviewList } from '@/api/sign/index'
export default {
  name: 'Index',
  data(){
	return{
      isLoading: false,// 正在加载
	  list:[],
	  current_page:0,
	  last_page:0
	}
  },
  created () {
    // 初始化页面
    this.getList()
  },
  methods: {
	back(){this.$router.go(-1)},
    getList() {
		
		reviewList().then((result)=>{
			this.list = result.data.list.data;
			this.current_page = result.data.list.current_page
			this.last_page = result.data.list.last_page
		})
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.kg-ksli-heat{height: auto;}
.kg-ksli-heat .kg-ksxq-listb{padding: .24rem .2rem .24rem .4rem; line-height: 1.65;}
</style>
